//
//  CommonDef.h
//  PigMarket
//
//  Created by Felix on 2019/3/4.
//  Copyright © 2019 felix.pigmarket.oc. All rights reserved.
//

#ifndef CommonDef_h
#define CommonDef_h

#ifdef DEBUG
#define PMLog( s, ... )  NSLog( @"%@",[NSString stringWithFormat:(s), ##__VA_ARGS__] )
#else
#define PMLog( s, ... )
#endif

// 屏幕宽高
#define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
#define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
#define ScaleHeight(height) ((height) * (SCREEN_WIDTH / 375.0))
#define ScaleWidth(width) ((width) * (SCREEN_WIDTH / 375.0))

#define StatusBarFrame [[UIApplication sharedApplication] statusBarFrame]
#define NavigationBarFrame self.navigationController.navigationBar.frame
#define TopBarHeight (NavigationBarFrame.size.height + StatusBarFrame.size.height)
#define IPHONEXBottomEdge (StatusBarFrame.size.height > 20 ? 34 : 0)

//#define ScaleHeight(* [JTool getScreenWidthScale])

#define ISiPhone4 CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size)
#define ISiPhone5 CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size)
//判断iphone6
#define ISiPhone6 CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size)
//判断iphone6+
#define ISiPhone6Plus CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size)
// 判断 iPhoneX
#define ISiPhoneX CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size)
// 判断 iPhoneXsMax
#define ISiPhoneXsMax CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size)
// 判断 iPhoneXR
#define ISiPhoneXR CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size)

#endif /* CommonDef_h */

